package de.hpi.generator.config;

public class ColumnModel {
/**
 *
 * @author Michael Wolowyk
 */

    public String name;
    public int cellSize;
    public String dataType = null;
    public String unique = null;
    public String key = null;
    public String key_group = null;
    public String foreignkey = null;
    public DistributionModel distribution = null;



    /**
     * Initiailize fields for constructor
     * @param aName
     * @param aCellSize
     * @param aDataType
     * @param distribution 
     */
    private void InitFields(String aName, int aCellSize, String aDataType, DistributionModel distribution) {
        this.name = aName;
        this.cellSize = aCellSize;
        this.dataType = aDataType;
        this.distribution = distribution;
    }

    public ColumnModel(String aName, int aCellSize, String aDataType,
            DistributionModel distribution) {

        InitFields(aName, aCellSize, aDataType, null);
        this.distribution = distribution;
    }


    @Override
    public String toString() {
        return String.format("{name: %s, datatype: %s, cellSize: %d, distribution: %s}\n",
                this.name, this.dataType, this.cellSize, this.distribution.toString());
    }
}
